package com.lyncs.ods.req;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author alex
 * @date 2022/7/11 23:24
 * @description
 */
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class SaveCompanyRoleGroupReq {

    @ApiModelProperty("需要删除的权限组ID列表")
    private List<Long> deleteList;

    @ApiModelProperty("需要更新的权限组列表")
    private List<UpdateRoleGroup> updateList;

    @ApiModelProperty("需要新增的权限组名称列表")
    private List<String> newList;

    @Data
    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    public static class UpdateRoleGroup {

        @ApiModelProperty("权限组ID")
        @NotNull
        private Long id;

        @ApiModelProperty("权限组新名称")
        @NotNull
        private String name;
    }
}


